package com.capgemini.fs.app.ekms.service.implementations;

import java.util.List;

import com.capgemini.fs.app.ekms.model.Functionality;
import com.capgemini.fs.app.ekms.persistence.PersistenceService;
import com.capgemini.fs.app.ekms.persistence.dao.FunctionalityDAO;
import com.capgemini.fs.app.ekms.service.FunctionalityService;

public class FunctionalityServiceImpl implements FunctionalityService {

	private PersistenceService	persistenceService	= null;

	public PersistenceService getPersistenceService() {
		return persistenceService;
	}

	public void setPersistenceService(PersistenceService persistenceService) {
		this.persistenceService = persistenceService;
	}

	public FunctionalityDAO getFunctionalityDAO() {
		return getPersistenceService().getFunctionalityDAO();
	}

	public void createFunctionality(Functionality functionality) {
		getFunctionalityDAO().addFunctionality(functionality);
	}

	public Functionality getFunctionalityByName(String name) {
		return getFunctionalityDAO().getFunctionalityByName(name);
	}

	public List<Functionality> getAllFunctionalities() {
		return getFunctionalityDAO().getAllFunctionalities();
	}

	public List<String> getAllFunctionalityCategories() {
		return getFunctionalityDAO().getAllFunctionalityCategories();
	}

	public Functionality getFunctionalityByFunctionalityCode(
			String functionalityCode) {
		return getFunctionalityDAO().getFunctionalityByFunctionalityCode(
				functionalityCode);
	}

}
